import type { RouteRecordRaw } from 'vue-router';
// import Demo from "@/views/demo/index.vue";
// import Layout from "@/layout/index.vue";

const routes: Array<RouteRecordRaw> = [
    // {
    //   path: "/",
    //   name: "root",
    //   component: Layout,
    //   redirect: { name: "Demo" },
    //   children: [
    //     {
    //       path: "demo",
    //       name: "Demo",
    //       component: Demo,
    //       meta: {
    //         title: "主页"
    //       }
    //     }
    //   ]
    // },
    {
        path: '/auth',
        name: 'auth',
        component: () => import('@/views/auth/index.vue'),
        meta: {
            pageId: '10010',
            title: '授权',
            noCache: false
        }
    },
    // 仅收款码负付款场景
    // {
    //     path: '/',
    //     name: 'orderPay',
    //     component: () => import('@/views/order/pay/index.vue'),
    //     meta: {
    //         title: '向商家付款',
    //         noCache: true
    //     }
    // },
    // 聚合场景付款，收款码、开单收款、团购接龙
    {
        path: '/',
        name: 'orderPay',
        component: () => import('@/views/order/payment/index.vue'),
        meta: {
            pageId: '10000',
            title: '向商家付款',
            noCache: true
        }
    },
    {
        path: '/order-pay-result',
        name: 'orderPayResult',
        component: () => import('@/views/order/result/index.vue'),
        meta: {
            pageId: '10020',
            title: '付款结果',
            noCache: true
        }
    },
    // 微信点金计划结果页
    {
        path: '/wxpay-result',
        name: 'wxPayResult',
        component: () => import('@/views/order/wx-result/index.vue'),
        meta: {
            pageId: '10030',
            title: '付款结果',
            noCache: true
        }
    }
];

export default routes;
